<%@ page language="java" import="com.newcrm.bean.*,com.newcrm.config.*,com.newcrm.util.Util,java.util.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	User user = (User) session.getAttribute("user");
  Map<Integer, CompanyInfo> companys = (Map<Integer, CompanyInfo>) application.getAttribute(Const.APPLICATION_COMPANYS);
  CompanyInfo companyInfo = companys.get(Integer.valueOf(user.companyId));
  List<User> users = companyInfo.users;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>企搜客</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta name="renderer" content="webkit"/>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  <link rel="shortcut icon" href="<%=request.getContextPath()%>/images/qikebao.ico" />
  <link rel="stylesheet" href="<%=request.getContextPath()%>/css/all.css?ver=<%=Const.VERSION%>">
  <link rel="stylesheet" href="<%=request.getContextPath()%>/css/font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" href="<%=request.getContextPath()%>/css/datepicker.css" />
  <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap-datetimepicker.min.css" />
  <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap-wysihtml5.css" />
  <link rel="stylesheet" href="<%=request.getContextPath()%>/css/uploadify.css" />
  <link rel="stylesheet" href="<%=request.getContextPath()%>/css/magnific-popup.css">
  <link rel="stylesheet" href="<%=request.getContextPath()%>/css/jquery.mCustomScrollbar.css">
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/jquery-1.11.1.min.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/bootstrap.min.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/jquery-ui.min.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/jquery-ui-effect.min.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/jquery.mCustomScrollbar.concat.min.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/jquery.bootstrap-growl.min.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/moment.min.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/bootstrap-datepicker.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/bootstrap-datetimepicker.min.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/daterangepicker.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/jquery.magnific-popup.min.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/jquery.cookie.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/jquery.uploadify.v3.2.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/popbox.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/pageNavi.js?ver=<%=Const.VERSION%>"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/area.js?ver=<%=Const.VERSION%>"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/common.js?ver=<%=Const.VERSION%>"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/json2.js?ver=<%=Const.VERSION%>"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/script/qisouke.js?ver=<%=Const.VERSION%>"></script>
</head>
<body class="parties">
  <jsp:include page="topNavi.jsp" flush="true"/>
  <div class="main-page">
    <table>
    <tr>
      <td class="main-body">
        <div class="topnavi">
          <div class="leftMenu">
            <span>企搜客 - 汇聚 1500+ 万 优质潜在客户</span>
          </div>
        </div>

        <div class="fixbar" id="fixbar">
          <span class="qisoukebar">
            <span class="dropdown"><a href="#" data-toggle="dropdown"><b id="search-area">全国</b> <i class="fa fa-caret-down"></i></a>
            <ul class="province dropdown-menu pull-left" id="areaList">
              <li><a href="#" class="p">全国 </a></li>
              <li class="dropdown"><a class="p" href="#">安徽 <i class="fa fa-caret-right"></i></a><ul class="city" province="安徽"></ul></li>
              <li class="dropdown"><a class="p" href="#">北京 <i class="fa fa-caret-right"></i></a><ul class="city" province="北京"></ul></li>
              <li class="dropdown"><a class="p" href="#">福建 <i class="fa fa-caret-right"></i></a><ul class="city" province="福建"></ul></li>
              <li class="dropdown"><a class="p" href="#">甘肃 <i class="fa fa-caret-right"></i></a><ul class="city" province="甘肃"></ul></li>
              <li class="dropdown"><a class="p" href="#">广东 <i class="fa fa-caret-right"></i></a><ul class="city" province="广东"></ul></li>
              <li class="dropdown"><a class="p" href="#">广西 <i class="fa fa-caret-right"></i></a><ul class="city" province="广西"></ul></li>
              <li class="dropdown"><a class="p" href="#">贵州 <i class="fa fa-caret-right"></i></a><ul class="city" province="贵州"></ul></li>
              <li class="dropdown"><a class="p" href="#">海南 <i class="fa fa-caret-right"></i></a><ul class="city" province="海南"></ul></li>
              <li class="dropdown"><a class="p" href="#">河北 <i class="fa fa-caret-right"></i></a><ul class="city" province="河北"></ul></li>
              <li class="dropdown"><a class="p" href="#">河南 <i class="fa fa-caret-right"></i></a><ul class="city" province="河南"></ul></li>
              <li class="dropdown"><a class="p" href="#">黑龙江 <i class="fa fa-caret-right"></i></a><ul class="city" province="黑龙江"></ul></li>
              <li class="dropdown"><a class="p" href="#">湖北 <i class="fa fa-caret-right"></i></a><ul class="city" province="湖北"></ul></li>
              <li class="dropdown"><a class="p" href="#">湖南 <i class="fa fa-caret-right"></i></a><ul class="city" province="湖南"></ul></li>
              <li class="dropdown"><a class="p" href="#">吉林 <i class="fa fa-caret-right"></i></a><ul class="city" province="吉林"></ul></li>
              <li class="dropdown"><a class="p" href="#">江苏 <i class="fa fa-caret-right"></i></a><ul class="city" province="江苏"></ul></li>
              <li class="dropdown"><a class="p" href="#">江西 <i class="fa fa-caret-right"></i></a><ul class="city" province="江西"></ul></li>
              <li class="dropdown"><a class="p" href="#">辽宁 <i class="fa fa-caret-right"></i></a><ul class="city" province="辽宁"></ul></li>
              <li class="dropdown"><a class="p" href="#">内蒙古 <i class="fa fa-caret-right"></i></a><ul class="city" province="内蒙古"></ul></li>
              <li class="dropdown"><a class="p" href="#">宁夏 <i class="fa fa-caret-right"></i></a><ul class="city" province="宁夏"></ul></li>
              <li class="dropdown"><a class="p" href="#">青海 <i class="fa fa-caret-right"></i></a><ul class="city" province="青海"></ul></li>
              <li class="dropdown"><a class="p" href="#">山东 <i class="fa fa-caret-right"></i></a><ul class="city" province="山东"></ul></li>
              <li class="dropdown"><a class="p" href="#">山西 <i class="fa fa-caret-right"></i></a><ul class="city" province="山西"></ul></li>
              <li class="dropdown"><a class="p" href="#">陕西 <i class="fa fa-caret-right"></i></a><ul class="city" province="陕西"></ul></li>
              <li class="dropdown"><a class="p" href="#">上海 <i class="fa fa-caret-right"></i></a><ul class="city" province="上海"></ul></li>
              <li class="dropdown"><a class="p" href="#">四川 <i class="fa fa-caret-right"></i></a><ul class="city" province="四川"></ul></li>
              <li class="dropdown"><a class="p" href="#">天津 <i class="fa fa-caret-right"></i></a><ul class="city" province="天津"></ul></li>
              <li class="dropdown"><a class="p" href="#">西藏 <i class="fa fa-caret-right"></i></a><ul class="city" province="西藏"></ul></li>
              <li class="dropdown"><a class="p" href="#">新疆 <i class="fa fa-caret-right"></i></a><ul class="city" province="新疆"></ul></li>
              <li class="dropdown"><a class="p" href="#">云南 <i class="fa fa-caret-right"></i></a><ul class="city" province="云南"></ul></li>
              <li class="dropdown"><a class="p" href="#">浙江 <i class="fa fa-caret-right"></i></a><ul class="city" province="浙江"></ul></li>
              <li class="dropdown"><a class="p" href="#">重庆 <i class="fa fa-caret-right"></i></a><ul class="city" province="重庆"></ul></li>
            </ul>
            </span>
            <input type="text" autocomplete="off" id="searchKey" name="key" title="请输入公司名或产品信息" value="请输入公司名或产品信息">
            <a href="#" id="search-link" class="qisoukebar-searchButton">搜索</a>
          </span>
          <div class="toolbar" id="toolbarContainer">
            <div class="right" id="topPageNavi"><span id="currentpage"></span> / <span id="totalpage"></span><a title="上一页" id="prev-link" href="#" class="iconbutton"><i class="fa fa-chevron-left"></i></a> <a id="next-link" title="下一页" href="#" class="iconbutton"><i class="fa fa-chevron-right"></i></a></div>
            <div id="toolbar">
              <a id="selectall-link" title="全选/全不选" href="#" class="button grey small"><i id="selectall-icon" class="fa fa-square-o"></i> 全选</a>
              <a href="#" id="add-customer-link-multi" class="button green"><i class="fa fa-user-plus"></i> 加为客户</a>
            </div>
          </div>
        </div>
        <div class="loading" id="items_loading">
          <div class="liner">
            <h3>加载中...</h3>
            <img alt="加载中" src="<%=request.getContextPath()%>/images/dots-white.gif" />
          </div>
        </div>
        <div id="blank_slate" class="loading">
          <div class="liner">
            <h3>没有符合条件的客户信息</h3>
          </div>
        </div>
        <div class="searchresult" id="searchresult">
          <div class="customers_list" id="itemsList"></div>
          <div class="pagination"><div class="page-bottom" id="pageNavi"></div></div>
        </div>
      </td>
      <td class="main-sidebar">
        <div class="content">
          <h2 class="clearfix" style="margin-bottom:10px;">搜索内容</h2>
          <div class="clearfix"> <input type="radio" name="searchType" id="searchType_all" checked value="0"><label for="searchType_all">搜索全部</label></div>
          <div class="clearfix"> <input type="radio" name="searchType" id="searchType_name" value="1"><label for="searchType_name">只搜索公司名</label></div>
        </div>
        <div class="content" id="searchCondition">
          <h2 class="clearfix" style="margin-bottom:10px;">高级搜索</h2>
          <div class="clearfix">
            <span v="0" id="hasMobile" class="checkbox-button"><i class="fa fa-fw fa-square-o"></i> 有手机</span>
            <span v="0" id="hasEmail" class="checkbox-button"><i class="fa fa-fw fa-square-o"></i> 有邮箱</span>
            <span v="0" id="hasFax" class="checkbox-button"><i class="fa fa-fw fa-square-o"></i> 有传真</span>
            <span v="0" id="hasBaidu" class="checkbox-button"><i class="fa fa-fw fa-square-o"></i> 百度推广</span>
          </div>
          <h3 class="clearfix" style="margin-bottom:10px;">搜索来源</h3>
    	    <select id="searchSource" style="width:100%">
            <option value="">全部</option>
            <option value="1688">阿里巴巴</option>
            <option value="1688-fee">阿里巴巴诚信通</option>
            <option value="hc360">慧聪360</option>
            <option value="hc360-fee">慧聪360买卖通</option>
            <option value="58">58黄页</option>
            <option value="ganji">赶集黄页</option>
            <option value="china">中国供应商</option>
            <option value="madeinchina">made-in-china中文</option>
          </select>
          <h3 class="clearfix" style="margin-bottom:10px;">数据收录时间</h3>
    	    <select id="updateTime" style="width:100%" name="day">
    	      <option value="">无指定时间</option>
            <option value="1">今天收录</option>
            <option value="3">3天内收录</option>
            <option value="7">一周内收录</option>
            <option value="30">本月收录</option>
            <option value="90">本季度收录</option>
            <option value="180">半年内收录</option>
            <option value="365">今年内收录</option>
            <option value="720">两年内收录</option>
          </select>
        </div>
        <div class="content" id="qisoukeSearchHistory">
          <h2 class="clearfix" style="margin-bottom:10px;">企搜客搜索历史</h1>
          <div class="clearfix" id="qisoukeSearchHistoryDetail"></div>
        </div>
      </td>
    </tr>
    </table>
  </div>

  <div id="company-detail-popup" class="white-popup big2 mfp-hide">
    <div class="popup-title"><span class="title">客户详细信息</span> <span class="popup-close-button"><i class="fa fa-times"></i>&nbsp;</span></div>
    <div class="qisouke-company-detail customerdetail">
      <div class="title">
        <table>
          <tbody>
            <tr>
              <td class="avatar"><img src="<%=request.getContextPath()%>/images/avatar_company.png"></td>
              <td><h1 id="company-detail-name"></h1><div class="tags"><span id="company-detail-linkman"></span> <span id="company-detail-duty"></span></div></td>
              <td align="right"><a href="#" id="add-customer-link" class="button green"><i class="fa fa-user-plus"></i> 加为客户</a></td>
            </tr>
          </tbody>
        </table>
      </div>
      <div>
        <div class="switches">
          <a href="#qisouke_company_tab1" class="activated">联系信息</a>
          <a href="#qisouke_company_tab2" class="">详细信息</span></a>
        </div>
        <div class="switchable">
          <div id="qisouke_company_tab1" class="switchableContainer">
            <table class="qisouke-desc-table">
              <tr>
                <th>联系人</th><td><span id="company-detail-linkman2" class="company-content"></span> <span id="company-detail-duty2" class="company-content"></span></td>
                <th>法人</th><td id="company-detail-header" class="company-content"></td>
              </tr>
              <tr>
                <th>手机</th><td id="company-detail-mobile" class="company-content"></td>
                <th>电话</th><td id="company-detail-tel" class="company-content"></td>
              </tr>
              <tr>
                <th>传真</th><td id="company-detail-fax" class="company-content"></td>
                <th>邮箱</th><td id="company-detail-email" class="company-content"></td>
              </tr>
              <tr>
                <th>QQ</th><td id="company-detail-qq" class="company-content"></td>
                <th>官网</th><td><a id="company-detail-website" class="company-content" href="#" target="_blank"></a></td>
              </tr>
              <tr>
                <th>地址</th><td colspan="3" id="company-detail-address" class="company-content"></td>
              </tr>
              <tr>
                <th>来源</th><td colspan="3"><a id="company-detail-baseUrl" class="company-content" href="#" target="_blank"></a></td>
              </tr>
            </table>
          </div>
          <div id="qisouke_company_tab2" style="display:none" class="switchableContainer">
            <table class="qisouke-desc-table">
              <tr>
                <th>成立时间</th><td id="company-detail-founded" class="company-content"></td>
                <th>经营模式</th><td id="company-detail-mode" class="company-content"></td>
              </tr>
              <tr>
                <th>注册资本</th><td id="company-detail-registeredCapital" class="company-content"></td>
                <th>员工人数</th><td id="company-detail-employee" class="company-content"></td>
              </tr>
              <tr>
                <th valign="top">主营产品</th><td colspan="3" id="company-detail-product" class="company-content"></td>
              </tr>
              <tr>
                <th valign="top">公司简介</th><td colspan="3" id="company-detail-reMark" class="company-content"></td>
              </tr>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div id="changevisibility-popup" class="white-popup mfp-hide">
    <div class="popup-title"><span class="title">添加客户</span> <span class="popup-close-button"><i class="fa fa-times"></i>&nbsp;</span></div>
    <div class="popup-content">
      将选择客户添加到：
      <select id="change_visibility_permissionsId">
        <optgroup label="公海">
          <jsp:include page="commonPublicDataSelection.jsp" flush="true"/>
        </optgroup>
        <optgroup label="员工">
          <jsp:include page="commonUserSelection.jsp" flush="true"/>
        </optgroup>
      </select> 名下
      <div id="uploadProgress" class="top20">
        <div id="progressbar"></div>
        <p style="text-align:center;padding-top:15px;padding-bottom:5px;">客户信息正在导入中 ( <span id="currentUploadNum">0</span> / <span id="totalImportNums"></span> )</p>
        <p style="text-align:center">请不要关闭或刷新该页面</p>
      </div>
    </div>
    <div class="buttonbar">
      <div class="right">
        <a id="add-customer-visibility-link" class="button blue small" href="#"><i class="fa fa-check"></i> 确定</a>
        <a class="button grey small popup-close-button" href="#"><i class="fa fa-times"></i> 取消</a>
      </div>
      <div class="message"></div>
    </div>
  </div>

  <input type="hidden" id="referenceUrl" value="">
  <input type="hidden" id="referenceTitle" value="">
  <input type="hidden" id="referenceId" value="">
  <input type="hidden" id="referenceType" value="">
</body>
</html>